@echo off
chcp 65001 >nul
echo Compiling Data Structure Demo Programs
echo ======================================

echo Compiling array_demo.cpp...
g++ -o array_demo.exe array_demo.cpp
if %errorlevel% == 0 (
    echo [OK] array_demo.exe compiled successfully
) else (
    echo [ERROR] array_demo.cpp compilation failed
)

echo.
echo Compiling stack_demo.cpp...
g++ -o stack_demo.exe stack_demo.cpp
if %errorlevel% == 0 (
    echo [OK] stack_demo.exe compiled successfully
) else (
    echo [ERROR] stack_demo.cpp compilation failed
)

echo.
echo Compiling queue_demo.cpp...
g++ -o queue_demo.exe queue_demo.cpp
if %errorlevel% == 0 (
    echo [OK] queue_demo.exe compiled successfully
) else (
    echo [ERROR] queue_demo.cpp compilation failed
)

echo.
echo Compiling hashtable_demo.cpp...
g++ -o hashtable_demo.exe hashtable_demo.cpp
if %errorlevel% == 0 (
    echo [OK] hashtable_demo.exe compiled successfully
) else (
    echo [ERROR] hashtable_demo.cpp compilation failed
)

echo.
echo Compiling comprehensive_demo.cpp...
g++ -o comprehensive_demo.exe comprehensive_demo.cpp
if %errorlevel% == 0 (
    echo [OK] comprehensive_demo.exe compiled successfully
) else (
    echo [ERROR] comprehensive_demo.cpp compilation failed
)

echo.
echo Compilation completed!
echo.
echo Available programs:
echo - array_demo.exe
echo - stack_demo.exe
echo - queue_demo.exe
echo - hashtable_demo.exe
echo - comprehensive_demo.exe
echo.
pause